package com.amit.servlet;

import java.io.IOException;
import java.util.Locale;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ChangeLocale extends HttpServlet 
{
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
	
	String lan=request.getParameter("language");
	request.getSession().setAttribute("LANGUAGE", lan);
	
	Locale loc=new Locale(lan);
	response.setLocale(loc);
	request.getRequestDispatcher("index.jsp").forward(request, response);
	
	
	
	
}
}
